from fastapi import APIRouter,Request

from api.Login import index, login

ApiRouter = APIRouter(prefix = "/v1",tags = ["api路由"])

@ApiRouter.get("/input")
async def home(num: int):
    return {"num": num,"data": [{"num": num,"data": []},{"num": num,"data": []}]}

ApiRouter.get("/index",tags = ["api路由"],summary = "注册接口")(index)
ApiRouter.post("/login",tags = ["api路由"],summary = "登录接口")(login)

ApiRouter.get("/test/my/redis",tags=["api路由"],summary="fastapi的state方式")(test_my_redis)
ApiRouter.get("/test/my/redis/depends",tags=["api路由"],summary="依赖注入方式")(test_my_redis_depends)


